package com.klikmee.sms.core.base.postman;

import java.util.Date;

import com.klikmee.sms.core.model.BulkMessage;
import com.klikmee.sms.core.model.IncomingMessage;
import com.klikmee.sms.core.model.OutgoingMessage;
import com.klikmee.sms.core.model.Service;

public interface ServiceMessageDeliverer {
	
	/**
	 * This method forwards incoming message to service. 
	 * @param outgoingMessage message to be delivered
	 * @return true if operation is successful, false otherwise
	 */
	boolean deliverMessage(IncomingMessage outgoingMessage);
	/**
	 * Forwards delivery report to service instance. It uses om.Service ref to retrieve service endpoint
	 * and om.DeliveryStatus to notify sending result.
	 * @param outgoingMessage object containing delivery information.
	 * @return true if operation is successful, false otherwise
	 */
	boolean forwardDeliveryReport(OutgoingMessage outgoingMessage);
	
	/**
	 * Forwards bulk message delivery report to service instance. Uses {@link BulkMessage#getChargingCategory()} to
	 * retrieve service endpoint.
	 * @param bulkMessage
	 * @return
	 */
	boolean forwardDeliveryReport(BulkMessage bulkMessage);
	/**
	 * Forwards MTS subscription info to service instance.
	 * @param service service object representing instance of service to forward subscription.
	 * @param distributionListId name of distribution list
	 * @param msisdn user's phone number in format 3816..
	 * @param validTo date until which this subscription is valid
	 * @return true if operation is successful, false otherwise
	 */
	boolean forwardSubscripitonRequest(Service service, String distributionListId, String msisdn, Date validTo);
}
